﻿using System;
using System.Collections.Generic;
using Model.AuthModel;
namespace IDAL.AuthModel
{
    /// <summary>
    /// 通用组件，权限模型，接口层，成员角色表
    /// </summary>
    public interface IStaffRoles
    {
        /// <summary>
        /// 更新成员角色
        /// </summary>
        /// <param name="staffid">成员id</param>
        /// <param name="roles">角色id列表</param>
        /// <returns>返回是否修改成功</returns>
        bool UpdateStaffRoles(int staffID, string roles);

        /// <summary>
        /// 成员角色对应列表
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        IList<StaffRolesInfo> ListStaffRoles(StaffRolesCondition condition);

        /// <summary>
        /// 成员角色对应分页列表
        /// </summary>
        /// <param name="condition"></param>
        /// <param name="recordCount"></param>
        /// <returns></returns>
        IList<StaffRolesInfo> ListStaffRoles(StaffRolesCondition condition, out int recordCount);

        /// <summary>
        /// 查看成员具有的操作权限
        /// </summary>
        /// <param name="staffID"></param>
        /// <param name="moduleLink"></param>
        /// <param name="funcName"></param>
        /// <returns></returns>
        bool CheckRolesAuthByStaff(int staffID, string moduleLink, string funcName);

        /// <summary>
        /// 获取角色权限的模块
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        IList<StaffRolesInfo> ListRolesAuthModuleByStaff(StaffRolesCondition condition);

        /// <summary>
        /// 获取角色权限的模块分类，统计分类
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        IList<StaffRolesInfo> ListRolesAuthModuleTypeByStaff(StaffRolesCondition condition);
    }
}
